EMT Practice Test

1. Question Content...


Question List

Question1: A merchant requires that an existing section of the Site become editable from the Business Manager, so that they can modify it independently of the developer.
Which of these is an important factor for a developerto consider when choosing the appropriate solution between a content slot and a Page Designer component?

Question2: A business user wants to add a link to a content page from within the body of another content asset. The target content asset ID is: terms-and-conditions.
Which link function generates the correct link?

Question3: Which two methods are efficientand scalable? (Choose two.)

Question4: Multiple shoppers report slow performance on the Product Details Page.
Which tool can a developer use to view average response times for the Product-Detail controller route?

Question5: A developer has custom debug statements in a script, but the messages are not showing up in the Storefront Toolkit Request Log.
Which step needs to be completed to get the messages to appear in the Request Log?

Question6: A developer has a sandbox with code to log a message during execution, and the following code:

After the codeexecutes, the developer does not see any log file with the message in the WebDAV folder.
Which two tasks does the developer need to perform to correct this issue?
Choose 2 answers

Question7: Adigital instance has one site, with one master product catalog separate from the site catalog. Some, but NOT all, products in the master catalog are assigned to categories of the site catalog.
Using Business Manager, how can a Digital Developer create a catalog export file that contains only the products assigned to the site catalog?

Question8: Universal Containers wants to give customers the ability to refine product search results by a product custom attribute,weightCapacity.
Which series of steps should a Digital Developer take to show this refinement on the storefront?

Question9: A new product has been added to the Storefront catalog that 15 assigned to a site Which configuration does a developer need to ensure to have a new product visible in the Storefror

Question10: A developer uses hooks for an extension point. Which n true for running multiple hooks for an extension point?

Question11: A Digital Developer needs to add logging to the following code:

Which statement logs the HTTP status code to a debug-level custom log file?

Question12: The following sample code is NOT providing the desired results. The Digital Developer needs to add an entry to the logs to debug the problem.

Which statement correctly adds a log entry?

Question13: A merchant has a content slot on a page that currently displays products based on the top Sellers for the current week.
They wish to change this functionality and, instead, have the slot render a specific content asset so that the content experience is more personalized to the visitors.
Which two actions are necessary to make this change?
Choose 2 answers

Question14: Aclient has custom object definition and requirement that occasional data changes in staging also need to exist in production, Which task should the developer perform to meet these requirements when setting up the custom object?

Question15: A developer needs to check for product inventory in all inventory lists using the Open Commerce API.
An example requestURL is:

Which properly should the developer check in the OCAPI settings to confirm the appropriate resource is enabled?

Question16: A client wants to differentiate their monobrand stores with a special icon when shown in the store locator. The information is saved in a true/false custom attribute for each Store object in Merchant tools.
How should the developer follow SFRA best practices to expose this data for rendering?

Question17: Assume the code below is executing:

Business Manager has the configuration:
* Active Log category is "root" with log level of "info."
Given this information, what is the beginningof the filename in which the log will be written?

Question18: A developer needs to perform the same additional checks before completing multiple routes in a custom controller, in orderto decide whether to render a template or redirect the user to a different page.
According to SFRA best practices, what is the correct approach to improve code reusability in this scenario?

Question19: In order to build the SFRA code to adeveloper sandbox for the first time, which build steps should the developer perform for the site to appear and function as designed?

Question20: Which is an appropriate use of the <isif> ISML tag that follows B2C Commerce and SFRA best practices?

Question21: A Storefront is designed so that multiple pages share a common header and footer layout.
Which ISML tag should a developer use on the templates for these pages to avoid code repetition in the most effective way?

Question22: A Digital Developer needs to add a new form to the shopping cart page to allow customers to enter their rewards pass ID. There is already an existing Cart.js controller that handles processing of the other cartforms.
In addition, a form field node is in the form XML and the necessary form input is present in the ISML template.
The code below is the submit button for the ISML markup.

What additional steps must occur before the Digital Developer can begin writing the processing code for this request?

Question23: A client has two B2C Commerce sites in the same instance: one for the U.S market, the other forthe European market. The products they make are sold with different safety certificates based-on the world location.
For example, they sell a smartphone with certificate A in the U.S and certificate B in Europe, a hairdryer with certificate C in the U.S and certificate D in Europe, and more.
How should a developer allow the merchant to display the appropriate certification logo in the produce to details page, depending on the customer's location?

Question24: A Digital Developer is requesting product information for an external integration. The following Open Commerce API (OCAPI) request is NOT functioning correctly:

How should the Developer change the request?

Question25: A retailer notices that the Account Addresses page is showing the wrong shopper's address.
Which toolshould the developer start with to identify the issue?

Question26: Which method is efficient and scalable because it uses the product search index rather than searching the database?

Question27: Given the code snippet aboce, what should be added after this code so it can be used for page component display?

Question28: A developer set up a newsite with Taxation: Net. However, the business requirements changed and the site now needs to be Taxation:Gross. The Business Manager interface does not give this option.
Which sequence of steps is necessary to change the site to gross taxation?

Question29: A developer needs to update the package.json file so that it points to the hock file for a cartridge, using the hooks keyword. Which snippets work correctly when added to the file?:

Question30: The developer has been given the following business requirement:
The shipping method, "Free Standard Ground Shipping" has an exclusion for products with 'category equals oris child of electronics-televisions.' The marketing department has scheduled a sale offering a "Free Standard Ground Shipping" method for brand XyzTv televisions for the next 3 months.
What method accomplishes this while following best practices'

Question31: Given the following ISML example, how should a developer reference the product object in the current iteration of thebasket?
<isloop items ="${pdict.Basket.products}" var="product" status= "loopstatus">
...
</isloop>

Question32: Which line of code creates a content slot that can be included on homepage.isml to display on the home page?

Question33: Universal Containers recently completed updates to their storefront shopping cart page. A problem has been discovered since the update. Users are no longer able to submit coupon codes on this page. Additionally, authenticated userswho try to add a coupon are logged out.
The following processing code is found in the Cart.js controller file:

What should the Developer verify to identify the issue?

Question34: A developer has a requirement to display a banner in two different category pages.
Which snippet of code should the developeradd to a template to allow the merchant to configure each independently?

Question35: When looking at Custom Object instances for a site, a merchant notices that the creation date is not showing up on the instances in Business Manager.
Where should the developer add this attribute to the Custom Object so itis visible for the merchant to see in Business Manager?

Question36: A Digital Developer has been given a specification to integrate with aREST API for retrieving weather conditions. The service expects parameters to be form encoded.
Which service type should the Developer register?

Question37: Which three object types can a developer import using the Merchant Tools > Content > Import & Export module in Business Manager? (Choose three.)

Question38: A Digital Developer is implementing an Open Commerce API call to add products to a basket. Given the following resource configuration:

Which modification allows the requests to successfully execute?

Question39: A Digital Developer has identified that the code segment below is causing performance problems.

What should theDeveloper do to improve the code?

Question40: A developerhas a B2C site and a merchant requirement to add a new locale to it.
What are the steps to enable the locale in the Storefront?

Question41: A Digital Developer has a site export file on their computer that needs to be imported into their sandbox.
How should the developer update their sandbox with the data in this file?

Question42: A developer hasa sandbox configured with a service and its profile and credential. Now there is a requirement to allow changes to the service URL manually from the sandbox.
Which B2C feature should the developer use to achieve the request?

Question43: To ensure SFRA best practices and protect against request forgery, the developer introduced CSRF token generation in the customer address form:
<form ... action = "submit">
<input name ="${dw.web.CSRFProtection.getTokenName()}"
value = "${dw.web.CSRFProtection.generateToken()">
...
<the rest of the Form fields>
...
</form>
To implement CSRF protection when the form is submitted, the developer needs to introduce the CSRF validation using one or both of these methods as applicable:
validateRequest
validateAjaxRequest
Where in the code does the developer need to add this CSRF validation check?

Question44: A Digital Developer adds the following line of code to a script.

The code executes without error; however, the log file on disk does NOTcontain the log message.
Which two actions should be completed to write the log message to disk? (Choose two.)

Question45: What happens if the log file size limit is reached in custom logging?

Question46: Server.get('Show', consentTracking.consent, cache.applyDefaultCache, function (req,res,next){ Var Site = require('dw/system/Syte"); Var pageMetaHelpter = require('*/cartridge/scripts/helpers/pageMetaHelper'); pageMetaHelpter.setPageMetaTags(req.pageMetaData, Site.current); res.render('/home/homePage'); Missing code here
}, pageMetadata.computedPageMetadata);
The controller endpoint code snippet above does not work.
Which line of code should the developer use to replace line 6 and correct the problem?

Question47: A developer uses the call() instance method of dw.svc.Service to invoke a web service and implemented the callback methods defined by thedw.avc.ServiceCaliback class.
Which callback method is required only when invoking a SOAP service?

Question48: In Log Center, a developer notes j number of Cross Site Request Forgery (CSRF) log entries.
After adding the token in the 15ML template, which action might solve this problem'

Question49: A developer must configure permissions for an Open Commerce API resource on a sandbox instance that currently does not have any permissions configured.
Which two configuration properties are required to enable Access to the resource?
Choose 2 answers

Question50: Which two items are appropriate content of custom logs implemented atcheckout?
Choose 2 answers:

Question51: Given a template rendered by a controller with caching and a remote include without caching, which situation applies?

Question52: Given the file structure below, which ISML method call renders the customLandingPage template?

Question53: A developer has aspecification to integrate with a REST API for retrieving traffic conditions. The service expects parameters to be form encoded.
Which service type should the developer register?

Question54: In order to implement site custom functionality, a developer creates a new cartridge.
Which step should the developer take to ensure their cartridge changes take effect?

Question55: Universal Containers specifies a new category hierarchy for navigating thedigital commerce storefront. A Digital Developer uses Business Manager to manually create a catalog with the specified category hierarchy, then uses the Products & Catalogs > Import & Export module to export the catalog as a file.
How can other Developerswith sandboxes on the same realm create the same catalog in their own sandboxes?

Question56: Business Manager has the configuration:
Active log category is "root"
Log level of INFO
The code below execites:
Var log = Logger.getLogger("products","export");
Log.info ("This is important information");
Using this information, what is the beginning of the filename in which the log will be written?

Question57: A Digital Developer is tasked with setting up a new Digital Server Connection using UX Studio in their sandbox.
Which three items are required to accomplish this task? (Choose three.)

Question58: A merchant has reported that customers are seeing low stock items at the top of their search results, giving them a subpar customer experience and impacting conversion.
How might this issue be resolved to ensure a better customer journey?

Question59: The client provides the system integrator with translation messages for the newly added "French" ("fr") locale.
What is the correct folder to store the associated .properties files?

Question60: The developercreated a new Storefront category in storefront-catalog-m-en, but when viewing the Storefront site, the category is not visible.
What are two possible reasons?

Question61: A merchant has a content slot on a page that currently displays products based on thetop sellers for the current week. The merchant wants to change this functionality. They want to have the slot render a specific content asset so that the content experience is more personalized to the visitors.
Which two actions are necessary to make thischange?

Question62: A job executes a pipeline that makes calls to an external system.
Which two actions prevent performance issues in this situation? (Choose two.)

Question63: Universal Containers calls thefollowing combination of products "The Basics" and sells the combination as a unique product ID:
* One Model 103 container
* Five Model 611 container
* Tree Model 201 container
The Developer created these three products in the catalog.
What is the next stepin Business Manager to create "The Basics" as a combination?

Question64: A Digital Developernoticed that cartridges in their workspace are NOT executing. The Developer confirms that the cartridges are uploaded to the B2C Commerce server connection's target version directory.
Which action potentially solves this problem?

Question65: A merchant wants to obtain an export file that contains all the products .assigned to their Storefront catalog.
They do not know how to achieve this easily without manual processing, so asked their developer to help Generate this. The merchant s Instance setup is as follows:
They have one Master catalog and one storefront catalog.
Some, but not all, of the products in the Master catalog are assigned to categories within the Storefront catalog.
Which method allows the developer to generate the export for the merchant?

Question66: Given a sandbox with an active slot configuration with the following specifications:
* Content type set to product
* With someproduct configured
* With the following rendering template: slots/product/product_1x2 isml
* Correctly enabled and scheduled
And given the code contained in the selected rendering template:

Is an additional action needed for this to work asintended?

Question67: A developer wants to create in Business Manager extension with thecartridge named plugin_vm_extension.
Which two steps should the developer take for the extension option to show up in Business Manager?Choose 2 answers:

Question68: Which technical reports datapoint measures the performance of a controller's script execution if network factors and Web Adaptor processing is ignored?

Question69: A Digital Developer is inspecting the weekly service status report for a critical internally-hosted web service used inthe application and notices that there are too many instances of unavailability.
Which two solutions are possible options to reduce the unavailability of the service? (Choose two.)

Question70: A client has two B2C Commerce sites in the same instance: one forthe U.S. market, the other for the European market. They offer free gift wrapping on a selection of products. For each order, five products can be wrapped in the U.S., but only three products can be wrapped in the European region.
How should a developer allow the merchant to independently adjust this number?

Question71: A merchant has a new requirement to accept American Express credit cards on its Storefront. A credit card payment method already exists.
Which step must a developer take in Business Manager to achieve this?

Question72: Given the customerbasket described below:
A customer has an existing basket that consists of multiple items.
One of the items is identified as a gift item by an attribute at the product line item.
The developer needs to write custom code to fetch the customer basket andthen modify the basket based upon the items in the cart. If the basket contains any gift items, modify the basket and create a separate shipment for the gift item.
Four hooks are required to make the modification, beginning with modifyGETRespone and endingwith validatebasket.
Dw.ocapi.shop.basket.modifyGETResponse
-- missing hook -
-- missing hook --
dw.ocapi.shop.basket.validateBasket
What are the two missing hooks in the middle?

Question73: A developer needs to show only car accessories when shoppers use the search term car accessories and exclude technology accessories and household accessories.
Given the above requirement, what is the recommended approach using the Search Dictionaries Dashboard?

Question74: A Digital Developer has created a new PaymentForm controller thatrequires communication with the server and must be made using the HTTPS protocol.
Which code sample should the Developer use to make sure that HTTPS is used?

Question75: Given a file in a plug-in cartridge with the following code:
'use strict':
Var base = module.superModule;
Function applyCustomCache (req,res,next){
res.CachePeriod = 6; //eslint-disable-line no-param-reassign
res.cachePeriodUnit = 'hours') //eslint-disable-line no-param-reassign
next();
}
Module.exports = base;
Module.exports.applyCustomCache = applyCustomCache;
What does this code extend?

Question76: A developer wants to add a link to the My Account Page.
Whatis the correct code to accomplish this?

Question77: A Digital Developer is working on a projectto convert a pipeline to a JavaScript controller. UX Studio has a functioning pipeline debugger configured for the site. Assume the Developer will add a breakpoint to the controller when it is written.
What must be done in order to use the debugger with the new controller when it is written?

Question78: Given the requirements:
To integrate with an external web service using HTTP requests
To create a service for this purpose with the Service framework using the LocalServiceRegistry class.
To test the service before the external service provider makes the API available Which solution allows the developer to satisfy the requirements?

Question79: A developer wants to configure multiple products that should only be sold as a group. It should not bepossible for buyers to buy these products individually. How should the developer configure the products?

Question80: Given the sandbox with:
Service configured and assigned to its profile and credential
A code version that uses that service
And given the requirement to limit the number of success or error calls the code can perform to a restricted number ofcalls per second.
Which configuration should the developer perform?

Question81: An instance has custom logging enabled. The log reaches the file size limit.
What happens in this situation?

Question82: A developer is asked to write a log containing the ID and name of the product with a variable named myProduct.
Which snippet of code should be used?

Question83: The developer has been given the following business requirement:
The shipping method, Free Standard Ground Shipping' hasan exclusion for products *lth category equals or is child of electronics-televisions.' The marketing department has scheduled a sale offering a "Free Standard Ground Shipping" method for brand XyzTv televisions for the next 3 months.
What method accomplishes this while following best practices?

Question84: A developer is tasked with the development of anew Page Designer Page Type, as requested by themerchant.
How should they define the rendering logic of the page?

Question85: A developer is asked to create a new service instance that will call a remote web service.
Which method should the developer use to create the service instance?

Question86: A client has a requirement to render different content on the homepage based on if the customer is logged in or guest user.
What should a developer implement to achieve this requirement?

Question87: A client has a requirement to allow users on the Storefront to filter by a newly created attribute.
After creating the search refinement, what else is necessary to achieve this?

Question88: A developer is working on a new site for the U.S based on an existing Canadian site. One of the requirements is a change to the address form. The current Canadian form has an <options> list with the correct two-letter abbreviation for the provinces.
The U.S. requirements are to:
Have an <options> list withthe correct two-letter abbreviation for the states in place of the province field.
Set the U.S site locale.
Add the options list field definition to the XML file.
How should the developer set up the files before making the required edits?

Question89: A developer isimplementing new Page Designer content on a merchant's Storefront and adds the line shown below to the setupCsntentSearch function in the searchHelpers.Js file.
What does this achieve?